package com.example.elm.Account

import com.example.elm.Public.AccountInfo
import android.content.Context
import android.content.Intent
import androidx.activity.result.contract.ActivityResultContract

class HeadchangeContract : ActivityResultContract<AccountInfo, AccountInfo>(){
    override fun createIntent(context: Context, input: AccountInfo): Intent {
        val intent = Intent(context, HeadchangeActivity::class.java)
        intent.putExtra("info", input)
        return intent
    }
    override fun parseResult(resultCode: Int, intent: Intent?): AccountInfo {
        val data = intent?.getSerializableExtra("info") as AccountInfo
        return data
    }
}